package com.lantosec.hmrp.modules.system.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.system.vo.SysParameterVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 系统参数表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysParameter extends BaseEntity<SysParameterVO> {

    private static final long serialVersionUID = 1L;
    public SysParameter(SysParameterVO vo){
        this.paraName = vo.getParaName();
        this.paraValue = vo.getParaValue();
        this.paraType = vo.getParaType();
        this.remark = vo.getRemark();
    }

    @Override
    public SysParameterVO convertToVO(){
        return new SysParameterVO(this);
    }


    /**
     * 系统参数名(唯一)
     */
    @TableId(value = "para_name", type = IdType.ASSIGN_ID)
    private String paraName;

    /**
     * 系统参数值
     */
    private String paraValue;

    /**
     * 参数类型(1字符2数字3数组)
     */
    private Integer paraType;

    /**
     * 备注说明
     */
    private String remark;


    public enum ColName {
        para_name, para_value, para_type, remark, 
    }
}
